//
//  AVGDataList.h
//  Chart
//
//  Created by CaoJun on 13-6-6.
//
//

#ifndef __Chart__AVGDataList__
#define __Chart__AVGDataList__

#include "Metal.h"
#include "QuotationList.h"
#include "AVGData.h"
#include <vector>

namespace ytx{

    class AVGDataList : public QuotationList<AVGData>{
    private:
        LineType::LineType quotationType;
        static AVGDataList * instance;
        YTXTime ensureTime(YTXTime t1, YTXTime earlisetDate);
    public:
        AVGDataList(std::vector<Metal> & metalList, int spacing);
        virtual ~AVGDataList();
        
        void create(std::vector<Metal> & metalList);
        
        AVGData * get(std::string id);

        static AVGDataList * getInstance(std::vector<Metal> & metalList, int spacing);

        static AVGDataList * getInstance();
    };
}

#endif /* defined(__Chart__AVGDataList__) */
